import request from '../../service/http.js' // axios的封装 后续添加axios二次封装
import Vue from 'vue'
import qs from 'qs';
Vue.use(qs);
export default {
    wechat:"wechat/main/index",//获取权限
    site:"wechat/hot/site",//热门站点
    circuit:"wechat/hot/circuit",//热门线路
    all:"wechat/site/all",//所有站点
    sSearch:"wechat/shift/search",//班次查询
    search:"wechat/site/search",//站点搜索
    buynotice:"wechat/order/buynotice",//购票须知
    retreatnotice:"wechat/order/retreatnotice",//退票须知
    info:"/wechat/shift/info",//开单班次详情
    addorder:"wechat/order/addorder",//新增订单
    pay:"pay/addorder",//订单支付
    payorder:"pay/order",//订单支付
    code:"wechat/main/code",// 获取授权回调路径
    token:"wechat/main/token",// 获取验证token
    banner:"wechat/hot/banner",// 获取轮播图
}
//获取权限
export function wechat(data) {
    return request({
        url: 'wechat/main/index',
        method: 'post',
        data: qs.stringify(data)
    })
}

// 绑粉
export function bind(data) {
    return request({
        url: 'wechat/user/bind',
        method: 'post',
        data: qs.stringify(data)
    })
}

// 获取授权回调路径
export function code(data) {
    return request({
        url: 'wechat/main/code',
        method: 'post',
        data: qs.stringify(data)
    })
}

//热门线路
export function circuit(data) {
    return request({
        url: 'wechat/hot/circuit',
        method: 'post',
        data: qs.stringify(data)
    })
}

//获取轮播图
export function banner(data) {
    return request({
        url: 'wechat/hot/banner',
        method: 'post',
        data: qs.stringify(data)
    })
}

// 获取验证token
export function Token(data) {
    return request({
        url: 'wechat/main/token',
        method: 'post',
        data: qs.stringify(data)
    })
}

//站点搜索
export function search(data) {
    return request({
        url: 'wechat/site/search',
        method: 'post',
        data: qs.stringify(data)
    })
}

//热门站点
export function site(data) {
    return request({
        url: 'wechat/hot/site',
        method: 'post',
        data: qs.stringify(data)
    })
}

//所有站点
export function all(data) {
    return request({
        url: 'wechat/site/all',
        method: 'post',
        data: qs.stringify(data)
    })
}

//开单班次详情
export function info(data) {
    return request({
        url: '/wechat/shift/info',
        method: 'post',
        data: qs.stringify(data)
    })
}

//支付宝下单
export function alipayAddorder(data) {
    return request({
        url: 'alipay/addorder',
        method: 'post',
        data: qs.stringify(data)
    })
}

//支付宝下单
export function alipayorder(data) {
    return request({
        url: 'alipay/order',
        method: 'post',
        data: qs.stringify(data)
    })
}